/**
 *******************************************************************************
 * @brief       Provide a brief description of the module here (Single line).
 * 
 * @author      Ashwin Vijayakumar
 * 
 * @file        CalAtCmd.h
 * 
 * @version
 * 
 * @date        Aug 18, 2012 10:20:33 AM
 * 
 * @details     Provide a detailed description of the module here (Multi-line).
 * 
 * @pre         Mention any preconditions required to use this module.
 * 
 * @bug         List any bugs in this module.
 * 
 * @note        List any odd modes while using this module.
 * 
 * @warning     List any warnings against using the objects of this module.
 *******************************************************************************
 * @copyright 2012
 * <a href="http://www.afflatustech.com">Afflatus Techtronics</a>
 * and <a href="http://www.ashwinvijayakumar.co.nr">Ashwin Vijayakumar</a>
 * @n@n
 * This work is licensed under the Creative Commons
 * Attribution-NonCommercial-ShareAlike 3.0 Unported License. To view a copy
 * of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or
 * send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain
 * View, California, 94041, USA.
 *******************************************************************************
 */

/**@cond Include guard symbol - Protect against multiple inclusions  @endcond */

#ifndef CALATCMD_H_
#define CALATCMD_H_

/**@cond ***********************************************************************
 * Add #include "CalAtCmd.h" in source files that need access to the below 
 * listed declarations.
 ******************************************************************* @endcond */

/**@cond -----------------------------------------------------------------------
 * Includes section
 * Add all #include here.
 * ----------------------------------------------------------------- @endcond */

/**@cond System headers -------------------------------------------- @endcond */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

/**@cond Local headers --------------------------------------------- @endcond */
#include "Std_Types.h"
#include "Platform_Types.h"

/**@cond -----------------------------------------------------------------------
 * typedef section (Project scope)
 * Add typedef's with project scope here.
 * Capitalization: Upper_Camel_Case.
 * ----------------------------------------------------------------- @endcond */

/* Command set */
/**
 * @brief Command set.
 * @details No description.
 */
typedef enum
{
  AT_CMD_ATTENTION,     /**< Command: AT. */
  AT_CMD_SREG_TIME,     /**< Command: AT+St. */
  AT_CMD_SREG_DATE,     /**< Command: AT+Sd. */
  AT_CMD_SREG_MSG,      /**< Command: AT+Sm. */
  AT_CMD_ILLEGAL        /**< Bad/illegal command */
} CalAtCmd_CmdSetType;

/* S register type */
/**
 * @brief S register type.
 * @details This type shall be used to declare a variable which will hold the
 * contents of AT command S-register.
 */
typedef struct
{
  uint32_t date;        /**< Holds date in BCD format MSB->[WW|YY|MM|DD]<-LSB. WW = day of week (Zero-Indexed) */
  uint32_t time;        /**< Holds time in BCD format MSB->[AP|hh|mm|ss]<-LSB. AP: 0 = AM | 1 = PM */
} CalAtCmd_SregType;

/**@cond -----------------------------------------------------------------------
 * Constants section (Project scope)
 * Add all constants with project scope here.
 * Capitalization: ALL_CAPS.
 * ----------------------------------------------------------------- @endcond */

/**@cond -----------------------------------------------------------------------
 * Macros section (Project scope)
 * Add all macros with project scope here.
 * Capitalization: ALL_CAPS.
 * ----------------------------------------------------------------- @endcond */

/**@cond -----------------------------------------------------------------------
 * Global variables section (Project scope)
 * Add global variables with project scope here. 
 * Capitalization: lower_case.
 * Declare them with 'extern' keyword.
 * ----------------------------------------------------------------- @endcond */

/**@cond -----------------------------------------------------------------------
 * Function prototypes section (Project scope)
 * Add prototypes for all functions with project scope here. 
 * Capitalization: lower_Camel_Case.
 * ----------------------------------------------------------------- @endcond */

CalAtCmd_CmdSetType CalAtCmd_ParseCmd( char* pCmdArg );

/**@cond -----------------------------------------------------------------------
 * Getter/setter prototype section (Project scope)
 * Add prototypes for getter/setter methods here.
 * Capitalization: get_Camel_Case/is_Camel_Case/set_Camel_Case. 
 * ----------------------------------------------------------------- @endcond */


#endif /* CALATCMD_H_ */


/** END OF FILE ********************* Copyright (C) 2012 Afflatus Techtronics */
